package com.smartshopping.view;

import android.content.Context;
import android.view.LayoutInflater;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.smartshopping.iu.R;

public class ListMarketItem extends LinearLayout {
	private ImageView image;
	private TextView name;
	private TextView address;
	private TextView phone;
	
    public ListMarketItem(Context context){
        super(context);
        LayoutInflater listItem = (LayoutInflater)this.getContext()
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        listItem.inflate(R.layout.activity_list_market_item, this, true);
        this.image = (ImageView)findViewById(R.id.list_market_item_image);
        this.name = (TextView)findViewById(R.id.list_market_item_name);
        this.address = (TextView)findViewById(R.id.list_market_item_address);
        this.phone = (TextView)findViewById(R.id.list_market_item_phone);
    }


	public void setImage(int id) 
	{
		this.image.setImageResource(id);
	}

	public void setName(String name)
	{
		this.name.setText(name);
	}


	public void setAddress(String address) 
	{
		this.address.setText(address);
	}


	public void setPhone(String phone) 
	{
		this.phone.setText(phone);
	}
	
	
}
